﻿using System;
using System.Collections.Generic;
using DataAccess.Services.Interfaces;
using DataControl;
using NHibernate;

namespace DataAccess.Services.Gateways
{
	class RemittanceAdviceGateway : GatewayBase<RA>, IRemittanceAdviceGateway
	{
		public RemittanceAdviceGateway(ISession session) : base(session)
		{
		}

		public IEnumerable<string> GetRemittanceAdviceNumbersForClientByAccountCode(int clientId)
		{
			return DataControl.GetListRANumByClientId(clientId);
		}

		public void Store(RA remittanceAdvice)
		{
			Insert(remittanceAdvice);
		}

		public IEnumerable<RA> GetReceivedAdvices(int receiverPartyId, DateTime startDate, DateTime endDate)
		{
			return DataControl.GetReceivedAdvices(receiverPartyId, startDate, endDate);
		}

		public IEnumerable<RA> GetSentAdvices(int senderId, DateTime startDate, DateTime endDate)
		{
			return DataControl.GetSentAdvices(senderId, startDate, endDate);
		}
	}
}
